#include "StdAfx.h"
#include "lineedit.h"
#include <QPushButton>
LineEdit::LineEdit()
	: QLineEdit()
{

}

LineEdit::~LineEdit()
{

}

void LineEdit::resizeEvent(QResizeEvent* e)
{
	QPushButton *button = this->findChild<QPushButton*>(QString("search"));
	button->setGeometry(this->rect().width()-15,5,12,12);
	return __super::resizeEvent(e);
}
void LineEdit::mouseMoveEvent(QMouseEvent* e)
{
	static QCursor oldcur = this->cursor();
	if( e->x() > this->rect().width() - 20)
		this->setCursor(Qt::ArrowCursor);
	else
		this->setCursor(oldcur);
	return __super::mouseMoveEvent(e);
}